package com.cskaoyan.mapper;

import com.cskaoyan.bean.User;
import com.cskaoyan.bean.UserExample;

import java.util.Date;
import java.util.List;

import com.cskaoyan.bean.admin.vo.DateTimeVo;
import com.cskaoyan.bean.wx.vo.UserIdVo;
import org.apache.ibatis.annotations.Param;

public interface UserMapper {
    long countByExample(UserExample example);

    int deleteByExample(UserExample example);

    int deleteByPrimaryKey(Integer id);

    int insert(User record);

    int insertSelective(User record);

    List<User> selectByExample(UserExample example);

    User selectByPrimaryKey(Integer id);
    Integer selectByUserName(@Param("userName")String userName);
    Integer selectByMobile(@Param("m")String mobile);

    int updateByExampleSelective(@Param("record") User record, @Param("example") UserExample example);

    int updateByExample(@Param("record") User record, @Param("example") UserExample example);

    int updateByPrimaryKeySelective(User record);

    int updateByPrimaryKey(User record);

    int selectGoodsTotal();

    int selectUserTotal();

    int selectProductTotal();

    int selectOrderTotal();

    List<DateTimeVo> selectUserGroupByAddTime();

    List<UserIdVo> selectUsersByTime(Date add_time);

}